package org.javaqq.face.main.base;

import javax.swing.Icon;

public class IconData
{
  protected Icon   m_icon;
  protected Icon   m_openIcon;
  protected Object m_data;

  public IconData(Icon icon, Object data)
  {
    m_icon = icon;
    m_openIcon = null;
    m_data = data;
  }

  public IconData(Icon icon, Icon openIcon, Object data)
  {
    m_icon = icon;
    m_openIcon = openIcon;
    m_data = data;
  }

  public Icon getIcon() 
  { 
    return m_icon;
  }

  public Icon getOpenIcon() 
  { 
    return m_openIcon!=null ? m_openIcon : m_icon;
  }

  public Object getObject() 
  { 
    return m_data;
  }

  public String toString() 
  { 
    return m_data.toString();
  }
}